1. Field of the Invention
The present invention relates to an image data processing circuit and an image data processing method. More particularly, the invention relates to an image process suitable for correcting an optical black part in an output of a solid state image pickup device such as a digital still camera or a digital video camera.
2. Description of Related Art
In a video camera and the like, a CCD (Charge Coupled Device) is used as an image pickup device. An output of the CCD includes not only a photoelectric conversion output generated when light falls on the photosensitive surface of the CCD but also a component of dark current which occurs even when no light falls. Since the dark current also flows while valid pixels are read, the signal level becomes higher as a whole. It causes a problem such that the whole image becomes whitish and black becomes gray. To avoid the phenomenon, correction called OB (Optical Black) correction is made. Specifically, an OB (Optical Black) area which is masked is provided in a CCD, the signal level of the OB area is measured, and a clamp level is obtained. After that, a process of subtracting the clamp level from a signal of a valid pixel is performed. By the process, the component of the dark current is eliminated and only a photoelectric conversion output can be extracted.
FIG. 11 is a block diagram of a clamp circuit of Japanese unexamined patent publication No. 2000-156822. A comparing circuit 100 calculates a differential value “diff” between clamp levels of neighboring lines, calculates an absolute value “abs” of the difference of the clamp levels of the neighboring lines, compares the absolute value “abs” with a predetermined specification “m”, and generates a control signal for a selector 116. In the case where the absolute value “abs” is equal to or smaller than the specification “m” (abs≦m), an input terminal 116a is selected. In the case where the absolute value “abs” is larger than the specification “m” (abs>m) and the differential value “diff” between the clamp levels is larger than zero (diff>0), an input terminal 116b is selected. When the absolute value of the difference between the clamp levels of the neighboring lines is within a predetermined range, the clamp level of each line output from an integrating and averaging circuit 106 is used as it is. When the absolute value is larger than the predetermined range, it is updated by +1 or −1. In such a manner, the clamp level is updated on the line unit basis.
As a technique related to the above, Japanese unexamined patent publication No. 2003-319267 is disclosed.